//Movement
if (keyboard_check(ord("W")) )
    y -= 4*global.delta;
if (keyboard_check(ord("A"))) 
    x -= 4*global.delta;
if (keyboard_check(ord("S")))
    y += 4*global.delta;
if (keyboard_check(ord("D")))
    x += 4*global.delta;
    
//Update and reset Cooldown
if (fShotCooldownElapsed < fShotCooldown)
{
    fShotCooldownElapsed += global.delta;
}
if (fShotCooldownElapsed >= fShotCooldown)
{
    fShotCooldownElapsed = 0;
    bCanShoot = true;
}
    
//Shooting
if (keyboard_check(vk_space))
{
    if (bCanShoot = true)
    {
        newBullet = instance_create(x,y,pshot);
        newBullet.direction = direction+90;
        newBullet.speed = 2;
        newBullet.image_angle = newBullet.direction;
        bCanShoot = false;
    }
}

//basic bounding stuff
if(x<230) 
    x=230;
if(y<0) 
    y=0;
if(x>920) 
    x=920;
if(y>1152) 
    y=1152;
